import SeedEditor from "./src/SeedEditor.vue";
import SeedCreator from "./src/SeedCreator.vue";
import { currentApp, currentMicro } from "@/views/seed-dev";
export { SeedEditor, SeedCreator }

export function save(name: string, data: any) {console.log('save===', data)
  const microName = currentMicro.value
  if(microName) {
    const micro = currentApp.value.micros[microName]
    micro.seeds = micro.seeds || {}
    micro.seeds[name] = data
  } else {
    const app = currentApp.value
    app.seeds = app.seeds || {}
    app.seeds[name] = data
  }
}